convert all readFile, writeFile, and appendFile to close-on-exec safe versions
authorJoey Hess <joeyh@joeyh.name>
Fri, 5 Sep 2025 19:37:13 +0000 (15:37 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 5 Sep 2025 19:44:32 +0000 (15:44 -0400)
commit6f9a9c81f691f820737991da986a49fa01543d25
treee74eb75befbb535fba3286a53253e95708a4f26d
parent867110e9ee411b7dde2f7a195f09b1f80c442f40
convert all readFile, writeFile, and appendFile to close-on-exec safe versions

Even in the Build system. This allows grepping to make sure that there
are none left un-converted:

git grep "writeFile" |grep -v F\\.| grep -v doc/|grep -v writeFileString | grep -v writeFileProtected |grep -v Utility/FileIO
git grep "readFile" |grep -v F\\.| grep -v doc/|grep -v readFileString |grep -v Utility/FileIO
git grep "appendFile" |grep -v F\\.| grep -v doc/|grep -v appendFileString |grep -v Utility/FileIO

Might be nice to automate that to prevent future mistakes...

Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
58 files changed:
Annex/Content.hs
Annex/Fixup.hs
Annex/Path.hs
Annex/Sim.hs
Annex/Ssh.hs
Annex/YoutubeDl.hs
Assistant/DaemonStatus.hs
Assistant/Install.hs
Assistant/Install/AutoStart.hs
Assistant/Restart.hs
Assistant/Ssh.hs
Assistant/Upgrade.hs
Assistant/WebApp/Configurators/Local.hs
Assistant/WebApp/Control.hs
Assistant/WebApp/Documentation.hs
Build/Configure.hs
Build/DesktopFile.hs
Build/DistributionUpdate.hs
Build/LinuxMkLibs.hs
Build/NullSoftInstaller.hs
Build/Standalone.hs
Build/TestConfig.hs
Build/Version.hs
Command/FuzzTest.hs
Command/ImportFeed.hs
Command/Map.hs
Command/Sim.hs
Command/Vicfg.hs
Command/WebApp.hs
Config/Files.hs
Config/Files/AutoStart.hs
Config/Smudge.hs
Database/Keys.hs
Git/Construct.hs
Git/Hook.hs
Git/Objects.hs
Git/Repair.hs
Logs/File.hs
Logs/FsckResults.hs
Logs/Restage.hs
Logs/Schedule.hs
Logs/Transfer.hs
Logs/View.hs
Remote/Directory/LegacyChunked.hs
Remote/Tahoe.hs
Test.hs
Test/Framework.hs
Upgrade/V2.hs
Upgrade/V7.hs
Utility/Daemon.hs
Utility/FileMode.hs
Utility/FreeDesktop.hs
Utility/InodeCache.hs
Utility/LockFile/PidLock.hs
Utility/Misc.hs
Utility/Shell.hs
Utility/Tmp.hs
Utility/Tor.hs